import 'package:flutter/material.dart';
import 'package:login/pages/add.dart';
// import 'package:login/pages/ad.dart';
import 'package:login/pages/find.dart';
import 'package:login/pages/friends.dart';
import 'package:login/pages/login.dart';
import 'package:login/pages/nearby.dart';
import 'package:login/pages/register.dart';
import 'package:login/pages/register1.dart';
import 'package:login/pages/register2.dart';
import 'package:login/pages/setting.dart';
import 'package:login/pages/tabs.dart';
// import 'package:login/pages/add.dart';
// import 'package:login/pages/find.dart';
// import 'pages/login.dart';
// import 'pages/register.dart';
// import 'pages/register1.dart';
// import 'pages/register2.dart';
// import 'pages/setting.dart';
// import 'pages/tabs.dart';
// import 'pages/nearby.dart';
// import 'pages/friends.dart';
// import 'pages/find.dart';
// import 'pages/add.dart';
import 'pages/startapp.dart';
void main() {
  runApp(new MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
        title: '闪亮地摊',
        theme: ThemeData(primarySwatch: Colors.blue),
        debugShowCheckedModeBanner: false, //调试标签
        //建立路由表
        routes: <String, WidgetBuilder>{
          //  '/login':(context){
            //  return LoginPage();
          //  },
          '/startapp':(context) =>IntoAppPage(),
           '/login':(context) =>LoginPage(), //箭头函数为单行代码
           '/friends':(context) => FriendsPage(),
           '/tabs':(context) => TabsPage(),
           '/register':(context) => RegisterPage(),
           '/register1':(context) => RegisterPage1(),
           '/register2':(context) => RegisterPage2(), 
           '/find':(context) =>FindPage(),
           '/nearby':(context) => NearbyPage(),
           '/add':(context) => AddPage(),
           '/setting':(context) => SettingPage(),

        },
        // home: LoginPage()
        // home: RegisterPage()
        // home: RegisterPage1()
        // home: RegisterPage2()
        // home:SettingPage(）
        // home: TabsPage() //Material.App
        // home:NearbyPage()
        // home: FriendsPage(),
        // home: FindPage(),
        // home: AddPage(),
        home: IntoAppPage(),
        );
  }
}
